#pragma once

#include <gofcl_usbfs_gccfg.h>

typedef struct {
	u32_s : 16;
	u32_s pwr_on : 1;
	u32_s : 1;
	u32_s vbus_a_cmp_en : 1;
	u32_s vbus_b_cmp_en : 1;
	u32_s sof_out_en : 1;
	u32_s vbus_ignore : 1;
	u32_s : 10;
} usbfs_gccfg_expl_s;

_Static_assert(sizeof(usbfs_gccfg_expl_s) == 4,
	       "Struct usbfs_gccfg_expl_s defined error!");

static inline void usbfs_set_global_core_cfg(usbfs_gccfg_expl_s gccfg) {
	union {
		usbfs_gccfg_expl_s e;
		usbfs_gccfg_s g;
	} eg = {
		.e = gccfg,
	};
	usbfs_wreg_gccfg_s(eg.g);
}
